import React from 'react';

import CommonRequestDataAction from '../common/CommonRequestDataAction';
import Constants from '../../common/Constants';

export default class QZ_MyspaceAction extends CommonRequestDataAction {
  constructor() {
    super();

    this.moduleType = Constants.MODULE_TYPE.QUAN_ZI;
    this.name = "QZ_MyspaceAction";
  }

  finish(data, isSucceed, response) {
      if(isSucceed) {
        this.caller.setState({
          viewStatus: 13,
          mydata: data,
          isResponeUpdate: true,
        })
        this.onFinishSuccess(data, response);
      }
      else if (response) {
        if(response.status == 401) {
          this._dealUnauthorized(this.caller);
        }
        else {
          this.caller.setState({viewStatus: response.status})
        }
      }
      else {
        this.caller.setState({viewStatus: 400})
      }
    }
}
